<html>
	<head>
		<style>
			.s1{
				width:300px;
				height:200px;
				background-color:red;
			}
			.s2{
				background-color:yellow;
			}
		</style>
		<script type="text/javascript" 
		src="../js/jquery-1.4.3.js"></script>
		<script type="text/javascript">
			$(function(){
				//$('div').mouseenter(f1);//鼠标放上
				//$('div').mouseleave(f2);//鼠标离开
				$('div').hover(f1,f2);
			});
			function f1(){
				$('div').addClass('s2');
			}
			function f2(){
				$('div').removeClass('s2');
			}
		</script>
	</head>
	<body style="font-size:30px;">
		<div class="s1" ></div>
	</body>
</html>
